Rendering engines for creating images are well known. Such engines accept a definition of an image to be produced, often referred to as a scene definition, and create an image therefrom for storage and/or output on a suitable output means. One such rendering engine is the "mental ray" engine, included with the SoftImage.vertline.3D product sold by the assignee of the present invention and which can produce high quality, photo-realistic images.
One of the problems with rendering engines for high quality images is the computational complexity in rendering such an image, resulting in substantial times being required to render each image. While special rendering hardware and/or distributed processing systems are often employed to reduce rendering times, long rendering times remain a problem, especially when it is desired to render images in real time and/or to render images on lower cost systems, or on games systems such as the SEGA Saturn, Sony PlayStation and Nintendo 64 systems which have limited rendering hardware and yet have sophisticated rendering needs.
Known rendering engines, such as the above-mentioned "mental ray" renderer in SoftImage.vertline.3D, take a scene definition as input and produce a corresponding rendered image as an output. Such scene definitions can include geometric definitions for various 3D objects and their locations within the scene, the material characteristics of these objects (i.e.--surface roughness, color, transparency, etc.), the number, location and color of lights within the scene, the viewpoint and position from which the scene is viewed, usually referred to as the camera point of view, etc. In SoftImage.vertline.3D, and other systems, the factors which need to be considered for shading in the rendering of the scene are arranged in a structure called a "shade tree". Information on shade trees can be found in various publications, including in "Advanced Animation and Rendering Techniques, Theory and Practice", Chapter 14, by Alan Watt and Mark Watt, 1992, ACM Press, the contents of which are incorporated herein by reference. In the "mental ray" renderer, various predefined or user defined procedural functions, referred to as "mental ray shaders", can be defined and included in the shade tree to allow special rendering effects to be incorporated in the rendering process. "mental ray shaders" can be attached to various scene elements including: materials, textures, lights, etc., as desired.
In systems such as SoftImage.vertline.3D, it is known to reduce the computational complexity of rendering many 3D objects by tessellating 3D objects to obtain a polygon mesh representation of the defined 3D object and rendering the polygons in that mesh to obtain a reasonable approximation of the 3D object. For example, a sphere can be represented by a mesh of triangular polygons which closely model the sphere, the degree of correspondence between the mesh and the object generally being determined by the number of polygons in the mesh.
In SoftImage.vertline.3D the polygons used in the tessellation meshes to represent objects comprise triangular polygons as this is preferred for efficiency and simplicity and the following discussion primarily relates to such tesselated polygon meshes. However, as will be apparent to those of skill in the art, the present invention is not limited to use with meshes of triangular polygons and can be employed with polygons with more sides if desired. The conversion of an object to a tesselated representation is well known and will not be described further herein.
Rendering of objects represented by polygon meshes can be performed by scan line or ray tracing. In ray tracing, a final color is determined at each pixel of the rendered image by "firing" a light ray from the pixel to determine the reflections, refractions, mental ray shaders, etc. which contribute to the final color. While computationally expensive, ray tracing can produce very realistic results.
In scan line rendering, a determination is made at each pixel as to which objects are in front or behind the current pixel (depth-sorting) to determine whether they are "visible". Visible objects are displayed and non-visible objects are omitted. While scan line rendering is less computationally expensive, and is often supported by special purpose graphics hardware, it generally results in renderings of lower quality than ray tracing.
Part of the evaluation of a shade tree, in both scan line and ray trace rendering is the determination of vertex shading. In vertex shading, a final color is determined, by scan line or ray tracing, only at the vertices of each polygon which will be visible in the rendered image. The determined final colors are then linearly interpolating across the balance of the polygon. The rendered final colors at the vertices are determined from the vertex normals relative to the light sources, the defined surface characteristics, etc. Commonly, rendering hardware includes functions to perform the linear interpolation for the balance of the polygon, given the vertex colors.
While the modeling of objects with polygon meshes can reduce rendering complexity, the calculation of vertex color information by either means, but especially by ray tracing, is still computationally expensive.
Another common feature in rendered images is the use of texture mapped surfaces. Texture mapping a surface or object comprises projecting a two dimensional texture (a picture) onto objects and/or surfaces and, as with other objects, texture mapped objects are often represented as tesselated objects for rendering purposes. Texture pictures can include any pattern or image, for example photographic images of celebrities, patterns to represent woodgrain, marble, etc. and generally assist in obtaining a realistic final image or desired special effect. However, when rendering texture mapped objects and surfaces the rendering process, whether scan line, ray tracing or another rendering process, must consider each polygon or portion of a polygon in the tessellation mesh which will affect rendering of a pixel in the texture picture and this is also computationally expensive.
It is desired to have a system and method which allows for rendering engines to produce images of a desired quality with reduced rendering times.